{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
         <form action="" method="POST">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                    <p class="box-title">科任指派设置</p>
                </div>
                    <div class="box-body">
                         <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       教师姓名：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
									   <input name="q" id="staff_name" type="text" class="form-control" value="{%$staff_data.staff_name%}" autocomplete="off" >
									   <input name="staff_id" id="staff_id" type="hidden" class="form-control" value="">
                                  </div> 
				          </div>
                           <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       班级名称：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
								  {%foreach from=$class_lists key=key item=value%}
                                       <label class="choice"><input type="checkbox" name="class_ids[]" value="{%$value.class_id%}" {%if $value.is_check=='1'%}checked{%/if%}> {%$value.class_name%}</label>
								  {%/foreach%}
                                                                      
                                  </div> 
				            </div>
                            <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       学科名称：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
								  {%foreach from=$subject_lists key=key item=value%}
                                       <label class="choice"><input type="checkbox" name="subject_ids[]" value="{%$value.subject_id%}" {%if $value.is_check=='1'%}checked{%/if%}> {%$value.subject_name%}</label>
                                  {%/foreach%}                            
                                  </div> 
				            </div>
                            <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       周总课时：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
                                       <input type="number" class="form-control" name="week_hour" value="{%$week_hour%}">
                                  </div> 
				             </div>   
				    </div><!--box-body -->
                    <div class="box-footer text-center">
				      <button type="submit" class="btn btn-primary"> 确 定 </button>					  
				   </div>
                 </form>
             </div><!--box box-default box-solid-->
         </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script src="static/js/run_prettify.js"></script>
<script src="static/js/jquery.mockjax.js"></script>
<script src="static/js/bootstrap-typeahead.js"></script>
 <script>
		$(function() {
			function displayResult(item) {
				$("#staff_id").val(item.value);
				if(item.value > 0){
				//window.location.href="index.php?a=staff.subjectupdate&staff_id="+item.value;
				}
			}
			$('#staff_name').typeahead({
			 source: [
			{%foreach from=$staff_lists key=key item=value%}
            { id: {%$value.staff_id%}, name: '{%$value.staff_name%}' },
			{%/foreach%}
        ],

				onSelect: displayResult,
			});
		  
		});
	</script>